package com.gouqi.gouqirpc.fault.tolerant;

import com.gouqi.gouqirpc.model.RpcResponse;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * 静默异常处理-容错机制
 */
@Slf4j
public class FailSafeTolerantStrategy implements TolerantStrategy {
    @Override
    public RpcResponse doTolerantStrategy(Map<String, Object> context, Exception e) {
        log.info("静默处理异常");
        e.printStackTrace();
        return new RpcResponse();
    }
}
